<?php
/* @var $this BlessController */
/* @var $model ActBless */


$this->breadcrumbs=[
	'祝福日志'=>['index'],
	'管理',
];

$this->menu=[
	['icon' => 'glyphicon glyphicon-home','label'=>'Manage ActBless', 'url'=>['admin']],
	['icon' => 'glyphicon glyphicon-plus-sign','label'=>'Create ActBless', 'url'=>['create']],
];

$this->addPageOption(
	BSHtml::button('高级搜索',array('class' =>'search-button', 'icon' => BSHtml::GLYPHICON_SEARCH,'color' => BSHtml::BUTTON_COLOR_PRIMARY), '#')
);

$this->pageTitle='';
$this->pageSubTitle='';

Yii::app()->clientScript->registerScript('search',
    "
    $('.search-button').click(function(){
        $('.search-form').toggle();
            return false;
        });
        $('.search-form form').submit(function(){
            $('#act-bless-grid').yiiGridView('update', {
            data: $(this).serialize()
        });
        return false;
    });"
);
?>

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-success">
			<div class="panel-heading">
				<h4>祝福日志列表</h4>
			</div>
			<div class="panel-body">
		        <p>
		        	 你可以在搜索域的前面加上这些符号 (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>
		                &lt;&gt;</b>
		            或 <b>=</b>) 构成搜索表达式进行范围性的搜索。
		        </p>
		        <div class="search-form" style="display:none">
		            <?php $this->renderPartial('_search',[
		                'model'=>$model,
		            ]); ?>
		        </div><!-- search-form -->
		
		        <?php $this->widget('bootstrap.widgets.BsGridView',[
		        	'id'=>'act-bless-grid',
		        	'dataProvider'=>$model->search(),
		        	'type'=>'table bordered striped',
		        	'summaryText'=>'',
		        	'columns'=>[
						array(
							'name'=>'from_user_id',
							'value'=>'CHtml::value($data,"from_user.nickname")."(".CHtml::value($data,"from_user.mobile").")"'
						),
		        		array(
		        				'name'=>'to_user_id',
		        				'value'=>'CHtml::value($data,"to_user.nickname")."(".CHtml::value($data,"to_user.mobile").")"'
		        		),
						'from_mobile',
						'to_mobile',
		/*
						'prefix',
						'create_time',
						'delivery_time',
						'voice_id',
						'voice_user_id',
						'voice',
						'status',
						'review_status',
						'is_cancel',
						'ip',
						'u_delete',
						'fee',
						*/
		        		[
		        			'class'=>'bootstrap.widgets.BsButtonColumn',
							'template'=>'{view}'
		        		],
		        	],
				]); ?>
			</div> <!-- end panel-body -->
		</div>
	</div>
</div> <!-- end row -->
	    




